package com.example.demo.controller;

import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@RequestMapping("/User")
@Controller
@ResponseBody //用来设置当前类中返回的是数据而非页面
@Slf4j
public class UserController {
    //1.得到日志对象
    //private static Logger logger=LoggerFactory.getLogger(UserController.class);
    @RequestMapping("/amagi")
    public String sayAmagi(){
        //写日志
       log.warn("你干嘛");

        return "Amagi";
    }
}
